#ifndef _CRT_SECURE_NO_WARNINGS
	#define _CRT_SECURE_NO_WARNINGS // Deal with warnings in glui.h
#endif

#include <GL\glui.h>
#include "Imposters.h"
#include "Functions.h"
#include "Textures.h"
#include "RGBpixmap.h"

void draw_imposters() {

	// -ZY Plane
	glPushMatrix();
		glTranslated(-IMPOSTERS_X, 0.0, 0.0);
		glRotated(90, 0.0, 1.0, 0.0);
		drawRect(-IMPOSTERS_Z, IMPOSTERS_Z, -IMPOSTERS_Y, IMPOSTERS_Y, LANDSCAPE_TEX_ID);
	glPopMatrix();
	// ZY Plane
	glPushMatrix();
		glTranslated(IMPOSTERS_X, 0.0, 0.0);
		glRotated(-90, 0.0, 1.0, 0.0);
		drawRect(-IMPOSTERS_Z, IMPOSTERS_Z, -IMPOSTERS_Y, IMPOSTERS_Y, LANDSCAPE_TEX_ID);
	glPopMatrix();

	// -XY Plane
	glPushMatrix();
		glTranslated(0.0, 0.0, -IMPOSTERS_Z);
		drawRect(-IMPOSTERS_X, IMPOSTERS_X, -IMPOSTERS_Y, IMPOSTERS_Y, LANDSCAPE_TEX_ID);
	glPopMatrix();
	// XY Plane
	glPushMatrix();
		glTranslated(0.0, 0.0, IMPOSTERS_Z);
		glRotated(180, 0.0, 1.0, 0.0);
		drawRect(-IMPOSTERS_X, IMPOSTERS_X, -IMPOSTERS_Y, IMPOSTERS_Y, LANDSCAPE_TEX_ID);
	glPopMatrix();

	// -XZ Plane
	glPushMatrix();
		glTranslated(0.0, IMPOSTERS_Y, 0.0);
		glRotated(90, 1.0, 0.0, 0.0);
		drawRect(-IMPOSTERS_X, IMPOSTERS_X, -IMPOSTERS_Z, IMPOSTERS_Z, NO_TEX_ID);
	glPopMatrix();
	// XZ Plane
	glPushMatrix();
		glTranslated(0.0, -IMPOSTERS_Y, 0.0);
		glRotated(-90, 1.0, 0.0, 0.0);
		drawRect(-IMPOSTERS_X, IMPOSTERS_X, -IMPOSTERS_Z, IMPOSTERS_Z, NO_TEX_ID);
	glPopMatrix();
	
	glDisable(GL_TEXTURE_2D);
}